home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
grep
/
grep.lzh
/
tests
/
minix.script
< prev
next >
Wrap
Text File
|
1989-03-02
|
20KB
|
979 lines
failures=0
echo 'abc' | ../egrep -e 'abc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#1 failed
failures=1
else
echo Spencer test \#1 passed
fi
echo 'xbc' | ../egrep -e 'abc' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#2 failed
failures=1
else
echo Spencer test \#2 passed
fi
echo 'axc' | ../egrep -e 'abc' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#3 failed
failures=1
else
echo Spencer test \#3 passed
fi
echo 'abx' | ../egrep -e 'abc' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#4 failed
failures=1
else
echo Spencer test \#4 passed
fi
echo 'xabcy' | ../egrep -e 'abc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#5 failed
failures=1
else
echo Spencer test \#5 passed
fi
echo 'ababc' | ../egrep -e 'abc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#6 failed
failures=1
else
echo Spencer test \#6 passed
fi
echo 'abc' | ../egrep -e 'ab*c' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#7 failed
failures=1
else
echo Spencer test \#7 passed
fi
echo 'abc' | ../egrep -e 'ab*bc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#8 failed
failures=1
else
echo Spencer test \#8 passed
fi
echo 'abbc' | ../egrep -e 'ab*bc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#9 failed
failures=1
else
echo Spencer test \#9 passed
fi
echo 'abbbbc' | ../egrep -e 'ab*bc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#10 failed
failures=1
else
echo Spencer test \#10 passed
fi
echo 'abbc' | ../egrep -e 'ab+bc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#11 failed
failures=1
else
echo Spencer test \#11 passed
fi
echo 'abc' | ../egrep -e 'ab+bc' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#12 failed
failures=1
else
echo Spencer test \#12 passed
fi
echo 'abq' | ../egrep -e 'ab+bc' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#13 failed
failures=1
else
echo Spencer test \#13 passed
fi
echo 'abbbbc' | ../egrep -e 'ab+bc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#14 failed
failures=1
else
echo Spencer test \#14 passed
fi
echo 'abbc' | ../egrep -e 'ab?bc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#15 failed
failures=1
else
echo Spencer test \#15 passed
fi
echo 'abc' | ../egrep -e 'ab?bc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#16 failed
failures=1
else
echo Spencer test \#16 passed
fi
echo 'abbbbc' | ../egrep -e 'ab?bc' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#17 failed
failures=1
else
echo Spencer test \#17 passed
fi
echo 'abc' | ../egrep -e 'ab?c' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#18 failed
failures=1
else
echo Spencer test \#18 passed
fi
echo 'abc' | ../egrep -e '^abc$' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#19 failed
failures=1
else
echo Spencer test \#19 passed
fi
echo 'abcc' | ../egrep -e '^abc$' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#20 failed
failures=1
else
echo Spencer test \#20 passed
fi
echo 'abcc' | ../egrep -e '^abc' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#21 failed
failures=1
else
echo Spencer test \#21 passed
fi
echo 'aabc' | ../egrep -e '^abc$' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#22 failed
failures=1
else
echo Spencer test \#22 passed
fi
echo 'aabc' | ../egrep -e 'abc$' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#23 failed
failures=1
else
echo Spencer test \#23 passed
fi
echo 'abc' | ../egrep -e '^' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#24 failed
failures=1
else
echo Spencer test \#24 passed
fi
echo 'abc' | ../egrep -e '$' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#25 failed
failures=1
else
echo Spencer test \#25 passed
fi
echo 'abc' | ../egrep -e 'a.c' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#26 failed
failures=1
else
echo Spencer test \#26 passed
fi
echo 'axc' | ../egrep -e 'a.c' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#27 failed
failures=1
else
echo Spencer test \#27 passed
fi
echo 'axyzc' | ../egrep -e 'a.*c' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#28 failed
failures=1
else
echo Spencer test \#28 passed
fi
echo 'axyzd' | ../egrep -e 'a.*c' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#29 failed
failures=1
else
echo Spencer test \#29 passed
fi
echo 'abc' | ../egrep -e 'a[bc]d' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#30 failed
failures=1
else
echo Spencer test \#30 passed
fi
echo 'abd' | ../egrep -e 'a[bc]d' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#31 failed
failures=1
else
echo Spencer test \#31 passed
fi
echo 'abd' | ../egrep -e 'a[b-d]e' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#32 failed
failures=1
else
echo Spencer test \#32 passed
fi
echo 'ace' | ../egrep -e 'a[b-d]e' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#33 failed
failures=1
else
echo Spencer test \#33 passed
fi
echo 'aac' | ../egrep -e 'a[b-d]' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#34 failed
failures=1
else
echo Spencer test \#34 passed
fi
echo 'a-' | ../egrep -e 'a[-b]' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#35 failed
failures=1
else
echo Spencer test \#35 passed
fi
echo 'a-' | ../egrep -e 'a[b-]' > /dev/null 2>&1
if /usr/bin/test $? != 2
then
echo Spencer test \#36 failed
failures=1
else
echo Spencer test \#36 passed
fi
echo '-' | ../egrep -e 'a[b-a]' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#37 failed
failures=1
else
echo Spencer test \#37 passed
fi
echo '-' | ../egrep -e 'a[]b' > /dev/null 2>&1
if /usr/bin/test $? != 2
then
echo Spencer test \#38 failed
failures=1
else
echo Spencer test \#38 passed
fi
echo '-' | ../egrep -e 'a[' > /dev/null 2>&1
if /usr/bin/test $? != 2
then
echo Spencer test \#39 failed
failures=1
else
echo Spencer test \#39 passed
fi
echo 'a]' | ../egrep -e 'a]' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#40 failed
failures=1
else
echo Spencer test \#40 passed
fi
echo 'a]b' | ../egrep -e 'a[]]b' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#41 failed
failures=1
else
echo Spencer test \#41 passed
fi
echo 'aed' | ../egrep -e 'a[^bc]d' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#42 failed
failures=1
else
echo Spencer test \#42 passed
fi
echo 'abd' | ../egrep -e 'a[^bc]d' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#43 failed
failures=1
else
echo Spencer test \#43 passed
fi
echo 'adc' | ../egrep -e 'a[^-b]c' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#44 failed
failures=1
else
echo Spencer test \#44 passed
fi
echo 'a-c' | ../egrep -e 'a[^-b]c' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#45 failed
failures=1
else
echo Spencer test \#45 passed
fi
echo 'a]c' | ../egrep -e 'a[^]b]c' > /dev/null 2>&1
if /usr/bin/test $? != 1
then
echo Spencer test \#46 failed
failures=1
else
echo Spencer test \#46 passed
fi
echo 'adc' | ../egrep -e 'a[^]b]c' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#47 failed
failures=1
else
echo Spencer test \#47 passed
fi
echo 'abc' | ../egrep -e 'ab|cd' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#48 failed
failures=1
else
echo Spencer test \#48 passed
fi
echo 'abcd' | ../egrep -e 'ab|cd' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#49 failed
failures=1
else
echo Spencer test \#49 passed
fi
echo 'def' | ../egrep -e '()ef' > /dev/null 2>&1
if /usr/bin/test $? != 0
then
echo Spencer test \#50 failed
failures=1
else
echo Spencer test \#50 passed
fi
echo '-' | ../egrep -e '()*' > /dev/null 2>&1
if /u